import re
pattern = "Python"
val = "I am learning Python"
pos = re.search(pattern,val)
# <re.Match object; span=(14, 20), match='Python'>
print(pos)